package io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
文件输出流
 */
public class FosDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("fos.dat");

        fos.write(1);
        fos.write(2);
        System.out.println("数据已写入");
        fos.close();
    }

}
